import { ComputedRef, InjectionKey, inject, provide } from 'vue';
import { Map } from 'ol';

// 地图初始中心点
export const center: number[] = [116.394495, 39.913385];

// // 地图实例注入全局
// export const mapKey: InjectionKey<ComputedRef<Map | undefined>> =
//   Symbol('mapKey');

// export const usePrivideMap = (mapInstance: ComputedRef<Map | undefined>) => {
//   provide(mapKey, mapInstance);
// };

// export const useInjectMap = () => {
//   return inject(mapKey);
// };
